package cn.ecpay.unionpay.settle;

import cn.ecpay.unionpay.settle.util.CertUtil;

import java.security.cert.X509Certificate;

/**
 * Created by zhaoyanzeng on 2018/12/21.
 */
public class Test {

    //
    public static void main(String[] args) {
        String str = "-----BEGIN CERTIFICATE-----\\nMIIE2TCCA8GgAwIBAgIFQJVFVmUwDQYJKoZIhvcNAQELBQAwWDELMAkGA1UEBhMC\\nQ04xMDAuBgNVBAoMJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhv\\ncml0eTEXMBUGA1UEAwwOQ0ZDQSBBQ1MgT0NBMzEwHhcNMTgwMzE0MTAwMTA2WhcN\\nMjMwMzE0MTAwMTA2WjCBiDELMAkGA1UEBhMCQ04xFzAVBgNVBAoMDkNGQ0EgQUNT\\nIE9DQTMxMRMwEQYDVQQLDApDRkNBIE9DQTMxMRkwFwYDVQQLDBBPcmdhbml6YXRp\\nb25hbC0xMTAwLgYDVQQDDCdDRkNBQOS4reWbvemTtuiBlEBOOTEzMTAwMDA3MzYy\\nMzk4OTBUQDkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/Ti1mvwKT\\nF3/1ZwOlZzeur7lsv8KI10qOT4fsUy5WbyVayKLQCKVwXGiQqPHovuN3MBSggVrt\\n8xIhPO0PBTlZG5KRb2SIgAgbtFN7uFNxd62ZZp/QdlX3G+STsSKwjCjCMyJDd/wZ\\nCBrHEVPf3wQZUBCwExa3PNfJK76XpX9d2pBBtMXt3S4N0RrUB/mO6ZV2u3n6Bxs3\\n8oe29CFJNousOQSJN64R/SoisnHcQID6c/P32nUwir+P00GY3C74HoO8DnL6PLlR\\nCZBfqviRLrt6IdrZn/GpTm4PCNAqvvcfMkB3NYrpQTs+c9KUrQOno/gOt+CZdCsU\\nXN6M/qsts959AgMBAAGjggF3MIIBczBsBggrBgEFBQcBAQRgMF4wKAYIKwYBBQUH\\nMAGGHGh0dHA6Ly9vY3NwLmNmY2EuY29tLmNuL29jc3AwMgYIKwYBBQUHMAKGJmh0\\ndHA6Ly9jcmwuY2ZjYS5jb20uY24vb2NhMzEvb2NhMzEuY2VyMB8GA1UdIwQYMBaA\\nFOK0CcvNYaFzSnl/8YqDC920fowdMAwGA1UdEwEB/wQCMAAwSAYDVR0gBEEwPzA9\\nBghggRyG7yoBBDAxMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmNmY2EuY29tLmNu\\nL3VzL3VzLTE0Lmh0bTA8BgNVHR8ENTAzMDGgL6AthitodHRwOi8vY3JsLmNmY2Eu\\nY29tLmNuL29jYTMxL1JTQS9jcmw5NjguY3JsMA4GA1UdDwEB/wQEAwIGwDAdBgNV\\nHQ4EFgQUm29L0Mbe/Tk14WpenOo8q/8XsBMwHQYDVR0lBBYwFAYIKwYBBQUHAwIG\\nCCsGAQUFBwMEMA0GCSqGSIb3DQEBCwUAA4IBAQC8VRWzf9GPn/GpHHMZP0uv66e2\\nXywIV7lSPCZQagWUvKe+7fh+YEs+2fOVOurgKyRwonxG3qXhRsjy95twCyzkK9ri\\nPckln2h54PuzCbfE3VsimsuWIr2B6J3vePCt3sQDy068/AKMn9vUbWZ269dKK6AH\\n+ZZQ48HBBb2KvyQtg4e3fcDJLwnBDJaK8mqEOSbRG+RBa/zkfKvovpKyfkPkvl2h\\nLPKHSSn78oW1Tm5Agypr1B31bKmr2JVM6V1faaqlEjsbtx44xDTk/Gw+McqtXAbj\\nlQLKwM+IR/SM7xPpecZeERjQChjixLCe2n0FKQNjk1WNETMyB3twrmpX4k4N\\n-----END CERTIFICATE-----\",\"bankNo\":\"210200281\",\"signMethod\":\"01\",\"encoding\":\"UTF-8\",\"respMsg\":\"成功[00000000000]\",\"proAvlbBal\":\"0\",\"signature\":\"gKDREOkFdCofle/XzLN+aSk7bk/Tbvk3+8RkhbRjCZ7ZtHGUVho1gPf1pkHcLjOfydasn2V0pWIsBm+2WP5VTLXsIdfkSoQBW5qymrYLvNM+CfWECpuMDJCYL8K9fqQtnHhSqy0jRcvkhT/DU7JGiMiFqpthCR5ox/bx2nHFZ0jHcbtP7RNoXgwoAXdkK+8obXmsO1fSZFjKCnpWj4HnH/YdAf83Bmele/stAzsHxXlDfAUxrTeSEn79gqSvf6apAooYqB0lCt1ckimH/n06iTYFMkswmnuX775lHmWrFdLf2lbB3UtxypFJUl2Y48kQoF7fW8U73Gmx3rgPxJCRSQ==";
        X509Certificate x509Cert = CertUtil.genCertificateByStr(str);
        System.out.print("123123");
    }
}
